package pl.planito.entity;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the inv_hardware database table.
 * 
 */
@Entity
@Table(name="inv_hardware")
public class InvHardware implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private InvHardwarePK id;

	@Column(name="hardware_type")
	private String hardwareType;

	private String location;

	private int version;
	
	

	//bi-directional many-to-one association to Inventory
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumns({
		@JoinColumn(name="inventory_id_hard", referencedColumnName="id", insertable=false, updatable=false),
		@JoinColumn(name="inventory_inv_id_hard", referencedColumnName="inv_id", insertable=false, updatable=false)
		})
	private Inventory inventory;

    public InvHardware() {
    	System.out.println("test");
    }

	public InvHardwarePK getId() {
		return this.id;
	}

	public void setId(InvHardwarePK id) {
		this.id = id;
	}
	
	public String getHardwareType() {
		return this.hardwareType;
	}

	public void setHardwareType(String hardwareType) {
		this.hardwareType = hardwareType;
	}

	public String getLocation() {
		return this.location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public int getVersion() {
		return this.version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	public Inventory getInventory() {
		return this.inventory;
	}

	public void setInventory(Inventory inventory) {
		this.inventory = inventory;
	}
	
}